<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<div >
	<!-- t改为shieldTarget，且为jQuery选择器形式 -->
    <form action="${ctxPathA}/system/codegen/preference/addOrUpdate" method="post" autocomplete="off" class="show-info">
    	<shield:token/>
        <table class="tab-show">
			<caption>个人偏好配置</caption>
	        <tr>
	            <th width="15%">
	                <label>配置文件存放目录：</label>
	            </th>
	            <td ><input type="text" name="tmpDir" value="${model.saveDir }" style="width: 60%;border: none;" readonly="readonly"/></td>
	        </tr>
	        <tr>
	            <th >
	                <label>作者：</label>
	            </th>
	            <td ><input type="text" name="author" value="${model.author }" style="width: 60%;"/><span class="tips ml10">用于类注释的作者</span></td>
	        </tr>
	        <tr>
	            <th >
	                <label>邮箱：</label>
	            </th>
	            <td ><input type="text" name="email" value="${model.email }" style="width: 60%;"/><span class="tips ml10">用于类注释的作者邮箱</span></td>
	        </tr>
	        <tr>
	            <th width="15%">
	                <label>源码路径：</label>
	            </th>
	            <td ><input type="text" name="srcDir" value="${model.srcDir }" style="width: 60%;"/><span class="tips ml10">项目目录，用于代码生成时的“输出根目录”</span></td>
	        </tr>
	        <tr>
	            <th width="15%">
	                <label>最近使用的源码路径：</label>
	            </th>
	            <td >
	            	<ul class="ul-item-list">
<c:forEach var="recentSrcDir" items="${model.recentSrcDirs }" varStatus="var">
	            		<li>${recentSrcDir }<a class="del shieldDelete" title="删除"
	            			data-url="${ctxPathA}/system/codegen/preference/delRecentSrcDir?index=${var.count }" viewTitle="确定要从最近操作记录中删除该目录吗？">
							<img src="${ctxPath }/images/icon/delete.png" title="删除"></a><span class="line">|</span></li>
</c:forEach>
					</ul>
					<div class="tips mb0">保留最近的10条记录</div>
	            </td>
	        </tr>
	    </table>
	    <div style="margin-top:10px;" align="left">
			${model.comments }
		</div>
	    <div class="taCenter">
			<input type="submit" value="修改">
			<input class="shieldAjax" data-url="${ctxPathA}/system/codegen/preference/reset" src="${ctxPath }/images/cancel.png" type="button" value="重置" viewTitle="重置会清空已有的设置，确定重置吗？">
		</div>
    </form>
</div>